<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@page import="dao.NoteDao" import="util.JsonHelp"  %>    
<%
    	request.setCharacterEncoding("utf-8");
    String json;
    JsonHelp render = new JsonHelp();

    int id = Integer.valueOf(request.getParameter("id"));

    NoteDao dao = new NoteDao();
    int i = dao.updateShare(id);
    if(i>0){
    json= "{\"status\":1,\"msg\":\"保存成功\",\"url\":\"donoshare.jsp\",\"tag\":\"取消共享\"}";//成功共享时返回烦人json
    }else{
    	json= "{\"status\":0,\"msg\":\"保存失败\",\"url\":\"donoshare.jsp\",\"tag\":\"取消共享\"}";
    }
    render.renderJson(response, json);
    //json= "{\"status\":1,\"msg\":\"保存成功\",\"url\":\"doshare\",\"tag\":\"共享\"}";//取消共享成功时返回的数据
    %>
